<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="../js/vue.js">
		</script>



	</head>
	<body>
		<div id="app">
			<!-- 键盘只有一按下 就可以调用keyup -->
			<input type="text"  v-model="firstname" @keyup="getFullName" />
			+
			<input type="text" v-model="lastname" @keyup="getFullName"/>
			=
			<input type="text" v-model="fullname" />

		</div>
		<script>
			new Vue({
				el:'#app',
				data:{
					firstname:'',
					lastname:'',
					fullname:'',
				},
				methods:{
					getFullName(){
						this.fullname=this.firstname+this.lastname
					}
				}
				
			})

		</script>
	</body>
</html>
